# Version: 0. 0. 1
FROM debian:buster-slim
#MAINTAINER wangke(nbwk1988@163.com)

RUN echo "deb http://mirrors.163.com/debian/ buster main contrib non-free" > /etc/apt/sources.list  && \
    echo "deb-src http://mirrors.163.com/debian/ buster main contrib non-free" >> /etc/apt/sources.list  && \
    echo "deb http://mirrors.163.com/debian/ buster-updates main contrib non-free" >> /etc/apt/sources.list  && \
    echo "deb-src http://mirrors.163.com/debian/ buster-updates main contrib non-free" >> /etc/apt/sources.list  && \
    echo "deb http://mirrors.163.com/debian/ buster-backports main contrib non-free" >> /etc/apt/sources.list  && \
    echo "deb-src http://mirrors.163.com/debian/ buster-backports main contrib non-free" >> /etc/apt/sources.list  && \
    echo "deb http://mirrors.163.com/debian-security buster/updates main contrib non-free" >> /etc/apt/sources.list  && \
    echo "deb-src http://mirrors.163.com/debian-security buster/updates main contrib non-free" >> /etc/apt/sources.list


RUN apt-get update \
    && apt-get install -y git \
    make \
    autoconf \ 
    libreadline-dev \
    gcc  \
    && git clone https://gitee.com/wk1988/skynet-util.git \
    && cd skynet-util && bash ./up.sh && make BIN_PATH=/server/bin \
    && cd .. \
    && rm -rf skynet-util \
    && apt-get remove -y gcc \
    git \
    libreadline-dev \
    autoconf \
    make 

ENV TZ=Asia/Shanghai \
    DEBIAN_FRONTEND=noninteractive

RUN ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \
    && echo ${TZ} > /etc/timezone \
    && dpkg-reconfigure --frontend noninteractive tzdata \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /server